require 'fileutils'

namespace "build" do
    task :all do
        rhorootdir = ENV['RHO_ROOT']
        raise "RHO_ROOT is not set" if rhorootdir.nil?

        require File.join(rhorootdir, 'platform','iphone','rbuild','buildextension')

        IPhoneBuild.load_env_for_build_rhodes_ios_extension

        extension_name = "RubyServer"
        extension_lib_name = extension_name
        extension_xcode_target_name = extension_name

        ret= IPhoneBuild.build_rhodes_ios_extension(extension_name, extension_lib_name, extension_xcode_target_name)
    end
end

task :default => "build:all"
